<?php
require_once 'class/control.class.php';
ob_start();

$obj = new Control('consultar','cases',$_GET['i']);
$obj->Consult();
$con = $obj->result->lista;
?>
	<br />
	<div id="conteudo">
		<h1 style="float:right;margin-bottom:2px;"><?php echo $con['chamada'] != '' ? $con['chamada'] : '&nbsp;' ;?></h1>
		<br class="clear" />
		<div id="left" style="background-color:transparent;padding-top:0px;width: 245px;">
			<h2 class="cor_<?php echo $con['idcategorias'];?>" style="text-transform: uppercase;"><?php echo $con['titulo'];?></h2>
			<?php echo $con['texto'];?>
		</div>
		<div id="right" style="width:540px;background-color:transparent;padding:0px;text-align:right;">
			<?php 
				$obj = new Control('visualizar','imagens_cases',$_GET['i']);
				$obj->Lister();
			?>
			<div id="voltar">		
				<div class="cor_<?php echo $con['idcategorias'];?> txt">VOLTAR</div>
				<div class="cor_<?php echo $con['idcategorias'];?>_bg btn">&nbsp;</div>
			</div>
		</div>
		<br class="clear" />
		<br /><br />
	</div>
	<script type="text/javascript">
    	$(document).ready(function() {
    		$("#foo").carouFredSel({
    			circular: false,
    			infinite: false,
    			auto 	: false,
    			prev	: {	
    				button	: "#prev",
    				key		: "left"
    			},
    			next	: { 
    				button	: "#next",
    				key		: "right"
    			},
    			pagination	: "#pager"
    		});
    		$('#pager a span').html('&bull;');

    		
    		
    		var total = $("#foo li").length;
			if(total < 4){
    			$('#pager').show().find('span').html('&nbsp;');
			}
    		$('#foo li').click(function(){
        		var src = 'imagens/cases/' + $(this).attr('title');
				$('#bigPic').attr('src',src);
        	});
    		$('#voltar').click(function(){
        		history.back(-1);
        	});
    					
		});
	</script>
<?php 
$conteudo = ob_get_contents();
ob_get_clean();
include ("master.php");
?>	